package edu.nf.supermarket.mapper;

import edu.nf.supermarket.entity.CommentImage;
import edu.nf.supermarket.entity.Comments;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yjj
 * @date 2025-06-10
 */
public interface CommentMapper {
    List<Comments> listComment(Integer productId);
    List<CommentImage> listCommentImage(Integer commentId);
    List<Comments> listCommentByUserId(Integer userId);
    void addComment(@Param("comments") Comments comments,@Param("userId") Integer userId,@Param("orderId") String orderId);
    void addCommentImages(@Param("commentId") Integer commentId,@Param("commentImage") CommentImage commentImage);
    void deleteComment(Integer commentId);
    List<Comments> findCommentByDESC(Integer commodityId);
    List<Comments> findGoodComment(Integer commodityId);
    List<Comments> findMiddleComment(Integer commodityId);
    List<Comments> findBadComment(Integer commodityId);
    List<Comments> findCommentWithImage(Integer commodityId);
}
